/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SLE_IPC_INTERFACE_SLE_HOST_H
#define SLE_IPC_INTERFACE_SLE_HOST_H

#include "iremote_broker.h"
#include "i_sle_host_callback.h"
#include "sle_ipc_interface_code.h"
#include "sle_address_parcel.h"
#include "sle_error_code.h"

namespace OHOS {
namespace NearLink {
namespace SleStandard {
namespace {
const std::string SLE_ANNOUNCE_SERVER = "SleAnnounceServer";
const std::string SLE_SEEK_SERVER = "SleSeekServer";
const std::string SLE_CONNECT_SERVER = "SleConnectServer";
const std::string SLE_SSAP_CLIENT_SERVER = "SleSsapClientServer";
const std::string SLE_SSAP_SERVER_SERVER = "SleSsapServerServer";
} // Server Name

class ISleHost : public OHOS::IRemoteBroker {
public:
    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.ISleHost");

    virtual SleErrorCode RegisterHostCallback(const sptr<ISleHostCallback> &callback) = 0;
    virtual SleErrorCode UnregisterHostCallback(const sptr<ISleHostCallback> &callback) = 0;
    virtual SleErrorCode EnableSle() = 0;
    virtual SleErrorCode DisableSle() = 0;
    virtual SleErrorCode GetSleState(int32_t &state) = 0;
    virtual SleErrorCode GetHostAddress(SleAddress &address) = 0;
    virtual SleErrorCode SetHostName(const std::string name) = 0;
    virtual SleErrorCode GetHostName(std::string &name) = 0;
    virtual SleErrorCode StartFlowMonitor() = 0;
    virtual SleErrorCode StopFlowMonitor() = 0;
    virtual SleErrorCode GetHostDefaultConnectConfig(SleConnectConfig &hostConnParam) = 0;
    virtual sptr<IRemoteObject> GetSleServerRemote(const std::string &name) = 0;
};
} // SleStandard
} // NearLink
} // OHOS

#endif // SLE_IPC_INTERFACE_SLE_HOST_H